import 'package:flutter/material.dart';

import 'package:get/get.dart';
import 'package:getwidget/components/typography/gf_typography.dart';
import 'package:getwidget/types/gf_typography_type.dart';

import '../controllers/gftypography_controller.dart';

class GftypographyView extends GetView<GftypographyController> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('排版'),
        centerTitle: true,
      ),
      body: Container(
        margin: EdgeInsets.all(10),
        child: ListView(
          children: [
            GFTypography(
              text: 'GF Header Typo1',
            ),
            Divider(),
            GFTypography(
              text: 'GF Header Typo1',
              type: GFTypographyType.typo1,
              showDivider: false,
            ),
            GFTypography(
              text: 'GF Header Typo2',
              type: GFTypographyType.typo2,
              showDivider: false,
            ),
            GFTypography(
              text: 'GF Header Typo3',
              type: GFTypographyType.typo3,
              showDivider: false,
            ),
            GFTypography(
              text: 'GF Header Typo4',
              type: GFTypographyType.typo4,
              showDivider: false,
            ),
            GFTypography(
              text: 'GF Header Typo5',
              type: GFTypographyType.typo5,
              showDivider: false,
            ),
            GFTypography(
              text: 'GF Header Typo6',
              type: GFTypographyType.typo6,
              showDivider: false,
            ),
            Divider(),

            GFTypography(
              text: 'GF Header Typo1',
              type: GFTypographyType.typo1,
              icon: Icon(Icons.send),
              showDivider: true,
              dividerWidth: Get.width,
              dividerColor: Colors.blue,
            ),
            Divider(),
            GFTypography(
              text: 'GF Header Typo1',
              type: GFTypographyType.typo1,
              icon: Icon(Icons.settings, color: Colors.white),
              showDivider: false,
              backgroundImage: AssetImage('assets/images/bg_drawer.jpg'),
            ),
          ],
        ),
      ),
    );
  }
}
